home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5095 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: feick.HSC.Colorado.EDU!MPONIKVAR
  2. From: MPONIKVAR@crete.hsc.colorado.edu (Marissa )
  3. Newsgroups: comp.lang.c++
  4. Subject: PLEASE HELP !!!
  5. Date: Fri, 2 Feb 1996 07:44:34 UNDEFINED
  6. Organization: University of Colorado, Health Sciences Center
  7. Message-ID: <MPONIKVAR.49.0018C68C@crete.hsc.colorado.edu>
  8. NNTP-Posting-Host: feick.uchsc.edu
  9. X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #1]
  10.  
  11. Please don't flame me!!!
  12.  
  13. I'm having some problems with a homework assignment, I'm VERY new to C++ 
  14. programming.  Could someone please help me?????
  15.  
  16. The assignment:
  17.  
  18. Write a program that will create a string array which will be populated at 
  19. compile time with test case strings containing data to be processed by  a 
  20. function called atoi (Your implementation will NOT use the C library 
  21. implementation).  Your atoi function will do error detection and will also 
  22. accept octal and hexadecimal strings like the C++ language constants.  A 
  23. status structure will be passed to the function by reference.  This structure 
  24. will contain:
  25.     * a Boolean status flag accepting the values of FAIL or PASS, and
  26.     * if the status is FAIL then set another integer vaiable in the structure to 
  27.        integer offset in the string at which the error occurred otherwise set the 
  28.        offset to the length of the string.
  29. Process a minimum of 10 test cases make sure some of them have errors.  Your 
  30. outpout to cout (in iostream.h) should include the string, the value your 
  31. conversion computed and the contents of the status structure for each test 
  32. case.
  33. Make sure your test cases test all of the functionality of the program.
  34.  
  35.  
  36. As you can imagine for someone with as little C++ programming as I've had this 
  37. is quite overwhelming.  I've asked the the professor about the string array, 
  38. and it is to be hardcoded in to make the assignment a little easier.  Could 
  39. someone please help me???!!!  I'll be eternally grateful.....
  40.  
  41. Thanks in advance, please e-mail me direct!
  42. Marissa
  43.